package page
{
	import flash.display.DisplayObjectContainer;
	import flash.events.Event;
	
	public class Page_startup extends Page
	{
		private var _state:int;
		private static const STATE_ENTER:int = 0;
		private static const STATE_DONE:int = 4;

		public function Page_startup(parent:DisplayObjectContainer)
		{
			super(parent);
		}
		
		override protected function onEnterFrame(e:Event):void
		{
			super.onEnterFrame(e);

			if(_state == STATE_ENTER)
			{
				_state = STATE_DONE;
			}
			else if(_state == STATE_DONE)
			{
			}

			//have to do this at last
			if(_state == STATE_DONE)
			{
				gotoNextPage();
			}
		}
		
		private function gotoNextPage():void
		{
			PageController.getInstance().selectDemo(Page_logo);
		}
		
		override public function enter():void
		{
			super.enter();
			_state == STATE_ENTER;
		}
		
		override public function exit():void
		{

			//
			super.exit();
		}
		
	}
}

